//
//  MyLove.swift
//  @available和#available
//
//  Created by 李煜 on 2024/1/4.
//

import Foundation

@available(iOS 15, macOS 10.15, watchOS 6, tvOS 13, *)
class MyLove {

    @available(iOS, introduced: 15, deprecated: 16,obsoleted:17,renamed: "newTest", message: "这个方法在iOS 15引入,在iOS 16过期,在iOS 17废弃,请尽快替换新方法newTest")
    func test() {}
}

class Person {
    @available(iOS 17, *)
    func newRun() {
        print("newRun is only available in iOS 17 or newer.")
    }

    func run() {
        print("run less than iOS 17.")
    }
}
